/*
 * @Date: 2025-06-18 18:40:21
 * @Auth: 463997479@qq.com
 * @LastEditors: 463997479@qq.com
 * @LastEditTime: 2025-09-09 16:25:34
 * @FilePath: \corpus\src\services\ant-design-pro\dept\index.ts
 */
// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

export async function getDeptList(
  params: {
    parentOrganizationCode?: string;
    searchValue?: string;
  },
  options?: { [key: string]: any },
) {
  return request<API.DeptType>('/corpus/knowledgeDept/getDeptList', {
    method: 'POST',
    data: params,

    ...(options || {}),
  });
}
export async function getDeptUserList(params: any, options?: { [key: string]: any }) {
  return request<API.DeptType>('/corpus/deptknowledgeUserPerm/getDeptUserList', {
    method: 'POST',
    data: params,

    ...(options || {}),
  });
}

export async function getUserByMobile(params: any, options?: { [key: string]: any }) {
  return request<API.DeptType>('/corpus/knowledgeUser/getUserByMobile', {
    method: 'POST',
    data: params,

    ...(options || {}),
  });
}
export async function addUser(params: any, options?: { [key: string]: any }) {
  return request<API.DeptType>('/corpus/knowledgeUser/addUser', {
    method: 'POST',
    data: params,

    ...(options || {}),
  });
}
export async function updateDeptUserPre(params: any, options?: { [key: string]: any }) {
  return request<API.DeptType>('/corpus/deptknowledgeUserPerm/updateDeptUserPre', {
    method: 'POST',
    data: params,

    ...(options || {}),
  });
}
export async function deleteDeptUserPre(
  accountId: string | number,
  options?: { [key: string]: any },
) {
  return request<API.DeptType>(
    `/corpus/deptknowledgeUserPerm/deleteDeptUserPre?accountId=${accountId}`,
    {
      method: 'get',

      ...(options || {}),
    },
  );
}
